Skip to content

fix(vscode-ext): prevent autosave from opening a Save File dialog on every edit - #3781

Closed
claudiusararu wants to merge 1 commit into
superdoc:v1from
claudiusararu:fix/vscode-ext-autosave-dialog
Closed

claudiusararu wants to merge 1 commit into
superdoc:v1from
claudiusararu:fix/vscode-ext-autosave-dialog

Conversation

@claudiusararu

Copy link
Copy Markdown

Problem

Fixes #3768. Editing any .docx in the SuperDoc VS Code extension pops a browser "Save File" dialog on essentially every edit (the ~1s debounced autosave and Cmd/Ctrl+S both trigger it), which makes real editing unusable.

Root cause

The webview autosave calls editor.export({ format: 'docx' }). SuperDoc's export() defaults triggerDownload: true, and for a single docx blob that path calls createDownload(...)window.showSaveFilePicker, opening the dialog. (format is also not a recognized export() option — the correct key is exportType.)

Fix

Pass triggerDownload: false (and the correct exportType: ['docx']) so export() returns the Blob directly — exactly what the blob.arrayBuffer()postMessage save path consumes. No dialog; silent autosave-to-disk keeps working.

// apps/vscode-ext/webview/main.js
- const blob = await editor.export({ format: 'docx' });
+ const blob = await editor.export({ exportType: ['docx'], triggerDownload: false });

@caio-pizzol

Copy link
Copy Markdown
Contributor

Thanks, Claudiu—your change addresses the unwanted downloads. Our V2 testing also uncovered an initialization issue that prevents us from verifying autosave end to end. We’ve retained your approach and the reproduction evidence in our V2 follow-up, and we’re closing this V1 PR in favor of that work. The fix hasn’t shipped yet.

@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code extension: autosave fires a "Save File" dialog on every edit (export() called without triggerDownload: false)

2 participants